{% extends 'HWIOAuthBundle::layout.html.twig' %}

{% block hwi_oauth_content %}
    <div class="col-xs-12">
        <h2 class="title">{{ 'header.connecting' | trans({}, 'HWIOAuthBundle')}}</h2>
    </div>

    <div class="col-md-6">
        <p>{{ 'connect.confirm.text' | trans({'%service%': service | trans({}, 'HWIOAuthBundle'), '%name%': userInformation.realName}, 'HWIOAuthBundle') }}</p>
        {{ form_start(form, {'action': path('hwi_oauth_connect_service', {'service': service, 'key': key}), 'attr': {'class': 'fos_user_registration_register'}}) }}
            {{ form_widget(form) }}
            <div>
                <button type="submit" class="btn btn-primary">{{ 'connect.confirm.submit' | trans({}, 'HWIOAuthBundle') }}</button>
                <a href="{{ path('hwi_oauth_connect') }}" class="btn btn-warning">{{ 'connect.confirm.cancel' | trans({}, 'HWIOAuthBundle') }}</a>
            </div>
        {{ form_end(form) }}
    </div>
    <div class="col-md-6">
        {% if userInformation.profilePicture is defined and userInformation.profilePicture is not empty %}
            <img src="{{ userInformation.profilePicture }}" />
        {% endif %}
    </div>
{% endblock hwi_oauth_content %}
